<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>


<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>无标题文档</title>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/jquery-1.42.min.js"></script>
<link href="${pageContext.request.contextPath}/css/bootstrap.min.css"
	rel="stylesheet" type="text/css">
<link href="${pageContext.request.contextPath}/css/font-awesome.min.css"
	rel="stylesheet" type="text/css">
<link href="${pageContext.request.contextPath}/css/base.css"
	rel="stylesheet" type="text/css">
<link href="${pageContext.request.contextPath}/css/reg.css"
	rel="stylesheet" type="text/css">
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/css/headbott.css"
	type="text/css" />
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/css/ace.min.css"
	type="text/css" />
</head>

<body>
	<div class="login-container">

		<div class="space-6"></div>

		<div class="position-relative">
			<div id="signup-box" class="signup-box widget-box no-border">
				<div class="widget-body">
					<div class="widget-main">
						<h4 class="header green lighter bigger">
							<i class="ace-icon fa fa-users blue"></i> 管理员注册
						</h4>

						<div class="space-6"></div>
						<p>填写信息:</p>

						<form id="registerForm">
							<fieldset>
								<label class="block clearfix"> <span
									class="block input-icon input-icon-left"> <input
										type="text" name="name" class="form-control"
										placeholder="管理员名字" /> <i class="ace-icon fa fa-envelope"></i>
								</span>
								</label> <label class="block clearfix"> <span
									class="block input-icon input-icon-left"> <input
										type="text" name="accountName" class="form-control"
										placeholder="账号" /> <i class="ace-icon fa fa-user"></i>
								</span>
								</label> <label class="block clearfix"> <span
									class="block input-icon input-icon-left"> <input
										type="password" name="password" class="form-control"
										placeholder="密码" /> <i class="ace-icon fa fa-lock"></i>
								</span>
								</label> <label class="block clearfix"> <span
									class="block input-icon input-icon-left"> <input
										type="password" class="form-control" placeholder="确认密码" /> <i
										class="ace-icon fa fa-retweet"></i>
								</span>
								</label> <input type="radio" name="gender" value="男" />男性 <input
									type="radio" name="gender" value="女" />女性
								<div class="space-24"></div>

								<div class="clearfix">
									<button type="reset" class="width-30 pull-left btn btn-sm">
										<i class="ace-icon fa fa-refresh"></i> <span
											class="bigger-110">重置</span>
									</button>

									<button type="button" onclick="btnRegister()"
										class="width-65 pull-right btn btn-sm btn-success">
										<span class="bigger-110">注册</span> <i
											class="ace-icon fa fa-arrow-right icon-on-right"></i>
									</button>
									<a href="${pageContext.request.contextPath }/pages/sss.action">sss</a>
								</div>
							</fieldset>
						</form>
					</div>
					<!-- /.widget-body -->
				</div>
			</div>
		</div>

		<script type="text/javascript"
			src="${pageContext.request.contextPath }/js/project/jquery.min.js"></script>
		<script type="text/javascript"
			src="${pageContext.request.contextPath }/js/jquery-1.42.min.js"></script>

		<script type="text/javascript">
			function btnRegister() {
				/* console.log($("#registerForm").serialize()); */
				$
						.ajax({
							url : "${pageContext.request.contextPath}/adminLogin/reg.action",
							method : "post",
							dataType : "json",
							data : $("#registerForm").serialize(),
							success : function(data) {
								alert("..." + data.msg);
								window.location.href = '${pageContext.request.contextPath}/adminLogin/login.action';
							},
							error : function() {
								alert("注册失败");
							}
						});
			}
		</script>
</body>
</html>
